from .models import Group
from rest_framework import serializers

class GroupSerializer(serializers.ModelSerializer):

    create_time = serializers.DateTimeField(format='%Y-%m-%d %H:%M:%S', read_only=True)
    class Meta:
        model = Group
        fields = ['id', 'name','create_time','update_time']

# class UserSerializer(serializers.ModelSerializer):
#     class Meta:
#         model = User
#         fields = ['id','username','first_name','last_name']